/*
 * Copyright：fxsen <br/>
 * Date: 2022/1/19 19:09 <br/>
 * Email:fxsen@foxmail.com
 * Author: fxsen
 */
package com.fxsen.commons.sysmanager.core.service;

import com.fxsen.commons.core.base.common.service.ICommonService;
import com.fxsen.commons.sysmanager.core.entity.Permission;

import java.util.List;
import java.util.Set;

/**
 * @describe: 系统权限接口服务层
 * @date: 2022/1/19 19:09
 * @author: fxsen
 */
public interface IPermissionService extends ICommonService<Permission> {
    Set<String> permissionSet();
    List<Permission> selectList();
    List<Permission> findByPid(String pid);
    /**
     * 按用户 ID 查找权限标记
     * @param userId  用户id
     * @return {@link Set}
     * @date 2022/1/24 15:41
     * @author fxsen
     **/
    Set<String> findPermissionTagByUserId(String userId);
    /**
    * 通过权限和用户id查询
    * @param tag
    * @param userId
    * @return {@link Permission}
    * @date 2022/4/17 23:00
    * @author fxsen <br/>
    * @email <a href="mailto:fuqiang@wisesoft.org.cn">
    **/
    Permission findByTagAndUserId(String tag,String userId);
}
